/*
Date:20210509 14:03PM
key:用一个vector装着
*/
class Solution {
public:
    string replaceSpace(string s) 
    {
        vector<char>q;
        for(int i=0;i<s.size();i++)
        {
            if(s[i]!=' ')
            {
                q.push_back(s[i]);
            }
            else{q.push_back('%');
            q.push_back('2');
            q.push_back('0');}
        }
        string s1="";
        for(char c:q)
        {
            s1+=c;
        }
        return s1;
    }
};